package com.hhh.petadopt.serviceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hhh.petadopt.service.LogoutService;
import com.hhh.petadopt.utils.E3Result;
import com.hhh.petadopt.utils.JedisClient;

/**
 * 退出登录
 * @author 杜镇声声
 *
 */
@Service
public class LogoutServiceImpl implements LogoutService {
	@Autowired
	private JedisClient jedisClient;

	//退出登录
	@Override
	public E3Result logout(String token) {
		Long expire = jedisClient.del("SESSION:"+token);
		return E3Result.ok(expire);
	}
	

}
